<?php 
//démarrage de la session
session_start();
if (isset($_POST['remember']) && empty($_COOKIE['pseudo']))
{
//si cookie vide 
	setcookie('pseudo', $_POST['login1'], time() + 3600*24*3, null, null, false, true); 
}
else if(isset($_POST['remember']) && !empty($_COOKIE['pseudo']))
{
// si cookie non vide
	setcookie('pseudo', '', 0, null, null, false, true); 
	setcookie('pseudo', $_POST['login1'], time() + 3600*24*3, null, null, false, true); 
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>

	<head>
	
		<title>chat-mb</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<link rel="stylesheet" type="text/css" href="styleFr.css" />
	</head>
	<body>
			<FONT face= "arial">
				<form action="checkFr.php" method="post">
				<p id= "words">
					Pseudo: <input id="ps" type="text" name="login1" maxlength=15 value=<?php echo $_COOKIE['pseudo']; ?> />&nbsp &nbsp		
					Mot de Passe: <input type="password" name="password1"  /><br/> <br/>
					Se souvenir de moi<input type="checkbox" name="remember" /><br /><br />
						<input type="reset" value="Annuler" >
					    <input type="submit" value="Connexion" >
					<br /><br />
			
					
				</p>
				</form>
				<form action="signupFr.php" onsubmit="return checkregister(this)" method="post">
				<p>
					<div>
					<center>
						<h2><FONT SIZE="6" id="words">Inscription</FONT></h2>
						<center><table border="1" width=60%  id="border1">
						<td>			
						<FONT SIZE="4" > 
							<label for="name">Nom :</label><input type="text" name="name" onblur="checkname_surname(this)" maxlength= "30"   /><br />
							<label for="surname">Prenom :</label><input type="text" name="surname" onblur="checkname_surname(this)" maxlength= "30"   /><br />
							<label for="login">Pseudo :</label><input type="text" name="login" onblur="checklogin(this)" maxlength= "15" placeholder="Minimum: 5 caracteres"   /><br />
							<label for="date">Date de naissance :</label><input type="date" name="date" onblur="checkdate(this)" /><br />
							<label for="email">Adresse Email :
							</label><input type="email" name="email" onblur="checkemail(this)" /><br/>
							<label for="confirm_email" id="transparent">Confirm_email</label><input type="email"  name="confirm_email" placeholder=" Confirmation email" onblur="checkemail(this)" /><br />
							<label for="password">Mot de Passe :<FONT SIZE="2"><br>(doit contenir au moins 8 caracteres dont une majuscule, une minuscule, et un chiffre) </FONT >
							</label><input type="password" name="password"  onblur="checkpwd(this)" /><br />
							<label for="confirm_password"id="transparent">Confirm_password</label><input type="password"  name="confirm_password" placeholder="Confirmez Mot de Passe" onblur="checkpwd(this)" /><br />
							<label for="sex">Sexe :</label><input type="radio" name="sex"  />Masculin <input type="radio" name="sex" />Feminin<br /> 
							<input type="reset" value="Annuler"  />
							<input type="submit" value="S'inscrire"/>
							<br><a  href="http://www.site.com">Oubli du Mot de Passe ?</a>
						</FONT>
						</td>
						</table></center>
					</div>
				</p>	
				</form>	
				
			</FONT>		
			<script type="text/javascript" language= Javascript src="signupFr.js"> </script>

	</body>
	
</html>
		
